package com.wjk.kylin.mall.gateway.feign;

import com.wjk.kylin.mall.common.core.dto.admin.MenuComponentInDTO;
import com.wjk.kylin.mall.common.core.dto.base.DataOutDTO;
import com.wjk.kylin.mall.gateway.feign.fallback.AdminFeignServiceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(value = "mall-admin",
        fallbackFactory = AdminFeignServiceFallbackFactory.class
)
@Component
public interface AdminFeignService {
    /**
     * 权限用户 角色
     * @param inDTO
     * @return
     */
    @PostMapping("/admin/role/getRoleIdByComponent")
    DataOutDTO<List<Long>> getRoleIdByComponent(@RequestBody MenuComponentInDTO inDTO);
}
